/*
 * @Author: Ryan Huang
 * @Date: 2019-04-20 19:54:32
 * @Description:输入名字
 */
package main

import (
	"fmt"
	"reflect"
)

func main() {
	var names = make([]string, 0)
	inputNames(names)
	fmt.Println(names)
}

func inputNames(names []string) {
	for {
		var name string
		fmt.Scanln(&name)
		if name == "exit" {
			break
		}
		names = append(names, name)
		reflect.PtrTo(names)
		fmt.Println(&names)
	}
}
